package com.example.tupu.relationship;

import com.example.tupu.entity.NODE;
import com.example.tupu.entity.Town;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.RelationshipProperties;
import org.springframework.data.neo4j.core.schema.TargetNode;
//import org.neo4j.ogm.annotation.*;

/**
 * 唯一节点关联河道
 */
@RelationshipProperties
public class ReNodeTown {
    @Id
    @GeneratedValue
    private Long id;
    private String title;
    private String type;
    @TargetNode
    private NODE start;
    @TargetNode
    private Town end;

    public ReNodeTown(String title, String type, NODE start, Town end) {
        this.title = title;
        this.type = type;
        this.start = start;
        this.end = end;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public NODE getStart() {
        return start;
    }

    public void setStart(NODE start) {
        this.start = start;
    }

    public Town getEnd() {
        return end;
    }

    public void setEnd(Town end) {
        this.end = end;
    }
}
